;AI

[Command]
name = "AI_0"
command = D, D, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_1"
command = D, D, D, D, D, D, D, D, D, U
time = 1

[Command]
name = "AI_2"
command = D, D, D, D, D, D, D, D, U, D
time = 1

[Command]
name = "AI_3"
command = D, D, D, D, D, D, D, U, D, D
time = 1

[Command]
name = "AI_4"
command = D, D, D, D, D, D, U, D, D, D
time = 1

[Command]
name = "AI_5"
command = D, D, D, D, D, U, D, D, D, D
time = 1

[Command]
name = "AI_6"
command = D, D, D, D, U, D, D, D, D, D
time = 1

[Command]
name = "AI_7"
command = D, D, D, U, D, D, D, D, D, D
time = 1

[Command]
name = "AI_8"
command = D, D, U, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

[Command]
name = "AI_9"
command = D, U, D, D, D, D, D, D, D, D
time = 1

;-| 超必殺技 |--------------------------------------------------------
;ここには超必殺技を記述してください、同じ名前を「name =」欄に書けますが
;コマンドは絶対に違ったものにしてください。
;カンフーマンは弱パンチと強パンチで技が出せるように同じ名前のコマンドで
;内容が弱と強になっています。
;「time=20」と書くことで「コマンドを20フレーム以内に入力」と設定できます。

[Command]
name = "Hack"
command = x, x, F, a, z
time = 40

[Command]
name = "BT"
command = ~D, D, D, a;+b+c
time = 20

[Command]
name = "FD_abc"
command = ~F, D, DF, a+b+c
time = 20

[Command]
name = "DB_abc"
command = ~D, DB, B, a+b+c
time = 20

[Command]
name = "DB_xyz"
command = ~D, DB, B, x+y+z
time = 20

[Command]
name = "DF_xyz"
command = ~D, DF, F, x+y+z
time = 20

[Command]
name = "DF_xyz"
command = ~D, DF, F, x+y
time = 20

[Command]
name = "DF_*z"
command = ~D, DF, F, x+z
time = 20

[Command]
name = "DF_*y"
command = ~D, DF, F, y+z
time = 20


[Command] 
name = "TripleKFPalm"   ;Same name as above
command = ~D, DF, F, D, DF, F, y
time = 20

;-| 必殺技 |------------------------------------------------------
[Command]
name = "tri"
command = z

[Command]
name = "BCF_x"
command = ~B,D, F, x

[Command]
name = "BCF_y"
command = ~B,D, F, y

[Command]
name = "BCF_z"
command = ~B,D, F, z

[Command]
name = "FC_x"
command = ~F,D, x

[Command]
name = "FC_y"
command = ~F,D, y

[Command]
name = "FC_z" 
command = ~F,D, z

[Command]
name = "BDB_a" 
command = ~B,D,BD, /a
time=30

[Command]
name = "BDB_b" 
command = ~B,D,BD, /b

[Command]
name = "BDB_c" 
command = ~B,D,BD, /c

[Command]
name = "/a" 
command = /a
time = 1

[Command]
name = "/b" 
command = /b
time = 1

[Command]
name = "/c" 
command = /c
time = 1

[Command]
name = "~a" 
command = ~a
time = 1

[Command]
name = "~b" 
command = ~b
time = 1

[Command]
name = "~c" 
command = ~c
time = 1

[Command]
name = "CF_x"
command = ~D, DF, F, x

[Command]
name = "CF_y"
command = ~D, DF, F, y

[Command]
name = "CF_z"
command = ~D, DF, F, z

[Command]
name = "CF_a"
command = ~D, DF, F, a

[Command]
name = "CF_b"
command = ~D, DF, F, b

[Command]
name = "CF_c"
command = ~D, DF, F, c

[Command]
name = "CB_x"
command = ~D, DB, B, x

[Command]
name = "CB_y"
command = ~D, DB, B, y

[Command]
name = "CB_z"
command = ~D, DB, B, z

[Command]
name = "CB_a"
command = ~D, DB, B, a

[Command]
name = "CB_b"
command = ~D, DB, B, b

[Command]
name = "CB_c"
command = ~D, DB, B, c

;[Command]
;name = "FF_ab"
;command = F, F, a+b

;[Command]
;name = "FF_a"
;command = F, F, a

;[Command]
;name = "FF_b"
;command = F, F, b

[Command]
name = "getup"
command = F, D, B, a

[Command]
name = "getup"
command = F, D, B, b

[Command]
name = "getup"
command = F, D, B, c

;※※※※※※※※※※※※※※※※※※※※ダッシュ攻撃コマンド

[Command]
name = "fwd_a"
command = /F,a
time = 1

[Command]
name = "fwd_b"
command = /F,b
time = 1

[Command]
name = "fwd_c"
command = /F,c
time = 1

;※※※※※※※※※※※※※※※※※※※※ハイジャンプコマンド
;×下をちょっと押して上を押す、と言う意味。
[Command]
name = "h_jump"    
;command = ~1$D,$U
command = a+b+c
time = 10

;※※※※※※※※※※※※※※※※※※※※後避け
;後を押しながらx+y+z、という意味
[Command]
name = "away-b"    
command = /B,x+y+z
time = 10

;※※※※※※※※※※※※※※※※※※※※前避け
;x+y+z、という意味
[Command]
name = "away-f"    
command = x+y+z
time = 10

;-| ２回押し技 |-----------------------------------------------------------
[Command]
name = "FF"     
command = F, F
time = 10

[Command]
name = "BB"     
command = B, B
time = 10

;-| ２・３個の同時押し技 |-----------------------------------------------
[Command]
name = "recovery"
command = x+y+z
time = 1

;-| ２・３個の同時押し技 |-----------------------------------------------
[Command]
name = "x+y+z"
command = x+y+z
time = 1

;-| ２・３個の同時押し技 |-----------------------------------------------
[Command]
name = "a+b+c"
command = a+b+c
time = 1

;-| 方向とボタンで出す技 |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

[Command]
name = "down_b"
command = /$D,b
time = 1

;-| ボタン設定（いじらない）|---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

[Command]
name = "b"
command = b
time = 1

[Command]
name = "c"
command = c
time = 1

[Command]
name = "x"
command = x
time = 1

[Command]
name = "y"
command = y
time = 1

[Command]
name = "z"
command = z
time = 1

[Command]
name = "start"
command = s
time = 1

;-| 押しっぱなし設定（いじらない）-------------------------------------------------------
[Command]
name = "holdfwd"
command = /$F
time = 1

[Command]
name = "holdback"
command = /$B
time = 1

[Command]
name = "holdup" 
command = /$U
time = 1

[Command]
name = "holddown"
command = /$D
time = 1

[Command]
name = "holdx"
command = /$x
time = 1

[Command]
name = "holdy"
command = /$y
time = 1

; 下の記述↓は絶対に消さないでください。
[Statedef -1]
;===========================================================================
; AI swich -> ON
[State -1,2]
type = Varset
triggerAll = var(59) = 0
trigger1 = command = "AI_0"
trigger2 = command = "AI_1"
trigger3 = command = "AI_2"
trigger4 = command = "AI_3"
trigger5 = command = "AI_4"
trigger6 = command = "AI_5"
trigger7 = command = "AI_6"
trigger8 = command = "AI_7"
trigger9 = command = "AI_8"
trigger10 = command = "AI_9"
trigger11 = command = "start"
var(59) = 1

; AI swich -> OFF
[State -1,2]
type = Varset
triggerall = var(59) = 1
trigger1 = RoundState != 2
trigger2 = (lose = 1) || (life <= 0) || (!Alive)
var(59) = 2

[State -1,2]
type = Varset
triggerall = var(59) = 2
trigger1 = RoundState = 2
var(59) = 1

;---------------------------------------------------------------------------
[State -1, s3l plus]
type = varset 
triggerall = var(59) = 1
trigger1 = stateno = [1030,1032] 
trigger1 = 0;p2statetype != A
var(2) = 1 + (random%3)

;---------------------------------------------------------------------------
;超必_アップグレード
[State -1]
type = ChangeState
value = 3070
triggerall = var(59) = 1
triggerall = var(58) = 0
triggerall = power >= 1000
triggerall = statetype != A
triggerAll = EnemyNear,MoveType != A
triggerAll = P2BodyDist X > 250
triggerAll = gameTime%100 = 0 && random%10 = 0
triggerall = ctrl
trigger1 = RoundNo = 1
trigger2 = RoundNo >= 2
trigger2 = life > 500

;---------------------------------------------------------------------------
;/**************************start
;夢幻回廊[http://mugen9.syuriken.jp/]
;---------------------------------------------------------------------------
;１、投げに対応するAI

;バックダッシュ
[State -1,1no1]
Type = ChangeState
Value = 105
TriggerAll = var(59) = 1                       ;AI判定
TriggerAll = StateType != A
TriggerAll = BackEdgeBodyDist >= 40
triggerall = (P2BodyDist X < 0) || (P2BodyDist X > 0) && (enemy,facing != facing)
Trigger1 = EnemyNear,MoveType = A
Trigger1 = EnemyNear,HitDefAttr = SCA,NT,ST,HT ;投げ属性の攻撃にのみ
Trigger1 = P2BodyDist X = [-5,60]
Trigger1 = P2BodyDist Y = [-30,30]
Trigger1 = Ctrl

;---------------------------------------------------------------------------
;アドバンシングガード
[State -1]
type = ChangeState
value = 830
triggerall = roundstate = 2
triggerall = var(59) = 1
triggerall = p2movetype = A;相手が攻撃状態の時
trigger1 = stateno = 150 || stateno = 151 || stateno = 152 || stateno = 153
trigger1 = random>700 && gameTime%5=0
ignorehitpause = 1

;---------------------------------------------------------------------------
;２、飛び道具に対応するAI
;立ちガード
[State -1,1no2]
Type = ChangeState
Value = IfElse(P2StateType = S,130,131)
TriggerAll = var(59) = 1
TriggerAll = StateType != A
TriggerAll = Ctrl
triggerall = (P2BodyDist X < 0) || (P2BodyDist X > 0) && (enemy,facing != facing)
Triggerall = Random = [0,700]
Trigger1 = P2MoveType = A 
Trigger1 = EnemyNear,HitDefAttr = SCA,NA,SA,HA           ;通常攻撃属性の攻撃にのみ
Trigger1 = P2BodyDist X = [0,80]
Trigger2 = Enemy,NumHelper > 0 || Enemy,NumProj > 0      ;相手が出したHelperまたはProjが一個以上あるとき
Trigger2 = EnemyNear,MoveType = A                        ;その飛び道具が攻撃状態のとき
;Trigger2 = InGuardDist                                   ;自分がガード可能なとき
Trigger2 = EnemyNear,HitDefAttr = SCA,NP,SP,HP,NA,SA,HA  ;投げ属性以外の攻撃にのみ

;---------------------------------------------------------------------------
;２、飛び道具に対応するAI
;空中ガード
[State -1,1no2]
Type = ChangeState
Value = 132
TriggerAll = var(59) = 1
TriggerAll = StateType = A
TriggerAll = Ctrl
triggerall = (P2BodyDist X < 0) || (P2BodyDist X > 0) && (enemy,facing != facing)
Triggerall = Random = [0,700]
Trigger1 = Enemy,NumHelper > 0 || Enemy,NumProj > 0      ;相手が出したHelperまたはProjが一個以上あるとき
Trigger1 = EnemyNear,MoveType = A                        ;その飛び道具が攻撃状態のとき
Trigger1 = EnemyNear,HitDefAttr = SCA,NP,SP,HP,NA,SA,HA  ;投げ属性以外の攻撃にのみ

;---------------------------------------------------------------------------
[State -1, hack]
type = ChangeState
value = 3020
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = power >= 3000
triggerall = life < 500
triggerall = p2bodydist X = [30,180]
triggerall = P2BodyDist Y = [-30,10]
trigger1 = ctrl
trigger2 = (life < 250) && (ctrl)
trigger3 = (stateno = [200,299]) || (stateno = [400,449])
trigger3 = movecontact

;---------------------------------------------------------------------------
;バレットタイム
[State -1]
type = ChangeState
value = 3005
triggerall = RoundState = 2
triggerall = power >= 1000
triggerall = statetype != A
triggerall = var(59) = 1
triggerall = Random = [0,50]
triggerall = var(3) = 0
triggerAll = P2Stateno != 5110
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,449])
trigger2 = movehit
trigger3 = (stateno = [1060,1062]) && (moveHit)

;---------------------------------------------------------------------------
[State -1, Hyper]
type = varset 
trigger1 = var(59) = 1
;trigger1 = power >= 1000
trigger1 = gametime%20 = 0
var(12) = random%41

[State -1, Hyper]
type = varset 
trigger1 = var(59) = 1
trigger1 = stateno = [3000,3019]
var(12) = 0

[State -1, 1/3]
type = varset 
trigger1 = var(59) = 1
var(13) = random%3
;---------------------------------------------------------------------------
[State -1, 乱舞]
type = changestate
triggerall = var(59) = 1
triggerall = (P2BodyDist X < 0) || (P2BodyDist X > 0) && (enemy,facing != facing)
triggerAll = var(3) = 0
triggerall = statetype != A
triggerall = power >= 1000
triggerall = p2bodydist X < 180
trigger1 = var(12) = [0,2]
trigger1 = (stateno = 210) || (stateno = 240) || (stateno = 440)
trigger1 = movehit
trigger2 = var(12) = [0,2]
trigger2 = (stateno = [1030,1699]) && (movehit)
trigger3 = var(12) = [0,2]
trigger3 = stateno = 1002
trigger3 = P2MoveType = H
value = 3010
;---------------------------------------------------------------------------
[State -1, 立ち乱射]
type = changestate
triggerall = var(59) = 1
triggerall = (P2BodyDist X < 0) || (P2BodyDist X > 0) && (enemy,facing != facing)
triggerAll = P2StateType != C
triggerall = statetype != A
triggerall = power >= 1000
trigger1 =  var(12) = 3
trigger1 = ctrl
trigger2 =  var(12) = [3,5]
trigger2 = (stateno = 210) || (stateno = 240) || (stateno = 440)
trigger2 = movehit
trigger3 =  var(12) = [3,5]
trigger3 = (stateno = [1030,1699]) && (movehit)
value = 3000
;---------------------------------------------------------------------------
[State -1, 屈み乱射]
type = changestate
triggerall = var(59) = 1
triggerall = (P2BodyDist X < 0) || (P2BodyDist X > 0) && (enemy,facing != facing)
triggerall = enemy,Pos Y = 0
triggerall = EnemyNear,StateType != A
triggerall = target,StateNo != [820,821]
triggerAll = prevstateno != 810
triggerAll = prevstateno != [1060,1062]
triggerall = statetype != A
triggerall = power >= 1000
trigger1 =  var(12) = 6
trigger1 = ctrl
trigger2 =  var(12) = [6,8]
trigger2 = (stateno = 210) || (stateno = 240) || (stateno = 440)
trigger2 = movehit
trigger3 =  var(12) = [6,8]
trigger3 = (stateno = [1030,1599]) && (movehit)
value = 3001
;---------------------------------------------------------------------------
[State -1, 空中ヘリガドリング]
type = changestate
triggerall = var(59) = 1
triggerAll = var(3) = 0
triggerall = statetype = A
triggerall = power >= 1000
trigger1 = var(12) = 9
trigger1 = ctrl
trigger2 = (life < 250) && (ctrl)
trigger2 =  var(12) = [9,10]
value = 3040
;---------------------------------------------------------------------------
[State -1, ヘリガドリング]
type = changestate
triggerall = var(59) = 1
triggerAll = var(3) = 0
triggerall = statetype != A
triggerall = power >= 1000
trigger1 = var(12) = 9
trigger1 = ctrl
trigger2 =  var(12) = [9,10]
trigger2 = p2bodydist X > 180
trigger2 = (prevstateno = [1030,1032]) || (prevstateno = [1040,1042])
value = 3030
;---------------------------------------------------------------------------
[State -1, matyokeb]
type = changestate
triggerall = var(59) = 1
triggerAll = var(3) = 0
triggerall = var(9) = 0
triggerall = statetype != A
triggerall = ctrl
trigger1 = var(12) = [36,37]
value = 1080
;---------------------------------------------------------------------------
;ハイジャンプ
[State -1, Run Fwd]
type = ChangeState
value = 840
triggerall = var(59) = 1
triggerall = roundstate = 2
triggerAll = statetype != A
trigger1 = prevstateno = 810
trigger1 = random%3 = 2
trigger2 = ctrl
trigger2 = P2BodyDist X =[0,30]
trigger2 = P2BodyDist Y < -70

;---------------------------------------------------------------------------
[State -1, Away]
type = ChangeState
value = ifelse((random%5 != [3,4]),110,115)
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = ctrl
trigger1 = Enemy,MoveType = A
trigger1 = p2bodydist X < 10
trigger1 = p2bodydist Y < -80
trigger2 = Enemy,MoveType != H
trigger2 = random%3 = 2
trigger2 = p2bodydist X < 85

;---------------------------------------------------------------------------
[State -1, msgn]
type = ChangeState
value = 1031
triggerall = var(59) = 1
triggerall = (P2BodyDist X < 0) || (P2BodyDist X > 0) && (enemy,facing != facing)
triggerall = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X = [120,180]
trigger1 = p2bodydist Y < -20
trigger2 = ctrl
trigger2 = p2bodydist X = [60,120]
trigger2 = p2bodydist Y < -40
trigger3 = (stateno = 1062) && (moveHit)

;---------------------------------------------------------------------------
[State -1, Throw1]
type = ChangeState
value = 800
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = ctrl
trigger1 = p2bodydist X < 5
trigger1 = prevstateno != 800
trigger1 = p2statetype != A
trigger1 = p2movetype != H

;---------------------------------------------------------------------------
[State -1,]
type = changestate
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = ctrl = 1
trigger1 = (p2statetype = S) && (p2bodydist X < 30)
value = ifelse(random%2 = 0,200,430)

;---------------------------------------------------------------------------
[State -1, 430~]
type = ChangeState
value = 430
triggerall = var(59) = 1
triggerall = statetype != A
triggerAll = prevstateno != 810
trigger1 = ctrl
trigger1 = p2bodydist X < 40
trigger1 = random%2 = 0
trigger2 = var(3) = 1
trigger2 = P2Stateno = 5110
trigger2 = p2bodydist X < 60

;---------------------------------------------------------------------------
[State -1, 200~]
type = ChangeState
value = 200
triggerall = var(59) = 1
triggerall = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X < 40
trigger1 = random%2 = 1
;---------------------------------------------------------------------------
[State -1, 200~]
type = ChangeState
value = 201
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = (stateno = 200) && (movehit)

;---------------------------------------------------------------------------
[State -1, 200~]
type = ChangeState
value = 202
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = (stateno = 201) && (movehit)

;---------------------------------------------------------------------------
[State -1, 200~]
type = ChangeState
value = 210
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = (stateno = 202) && (movehit)
;---------------------------------------------------------------------------
[State -1, 230~]
type = ChangeState
value = 230
triggerall = var(59) = 1
triggerall = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X = [3,40]
trigger2 = (stateno = 430) && (movehit)
trigger2 = var(12) = 1
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 2300
triggerall = statetype = A
triggerall = var(59) = 1
triggerall= stateno != 2300
triggerall = ctrl
trigger1 = p2bodydist Y > 40
trigger1 = var(12)%2 = 1

[State -1, 40]
type = ChangeState
value = 40
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = ctrl
trigger1 = p2bodydist X < 500
trigger1 = var(12) = [31,35]
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 305
;triggerall = command != "holddown"
triggerall = statetype = S
trigger1 = stateno = 100 ;ダッシュ中
trigger1 = var(59) = 1
trigger1 = p2bodydist X < 150;75

[State -1, 100]
type = ChangeState
value = 100
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = ctrl
trigger1 = p2bodydist X < 500
trigger1 = var(12) = [21,30]
trigger1 = stateno != 100

;---------------------------------------------------------------------------
[State -1, 直]
type = ChangeState
value = 1030
triggerall = var(59) = 1
triggerall = (P2BodyDist X < 0) || (P2BodyDist X > 0) && (enemy,facing != facing)
triggerall = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X > 230
trigger1 = p2statetype = C

;---------------------------------------------------------------------------
[State -1, 広]
type = ChangeState
value = 1032
triggerall = var(59) = 1
triggerall = (P2BodyDist X < 0) || (P2BodyDist X > 0) && (enemy,facing != facing)
triggerall = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X > 230

;---------------------------------------------------------------------------
[State -1, 上]
type = varset 
triggerall = var(59) = 1
triggerall = (P2BodyDist X < 0) || (P2BodyDist X > 0) && (enemy,facing != facing)
triggerall = stateno = [1030,1032] 
trigger1 = p2bodydist X < 120
trigger1 = p2bodydist Y < -40
var(2) = 2

[State -1, msgn]
type = ChangeState
value = 1041
triggerall = var(59) = 1
triggerall = var(2) = 2
triggerall = statetype != A
trigger1 = (stateno = [1030,1032]) && (Animelemtime(9) = 4)

;---------------------------------------------------------------------------
[State -1, 広]
type = varset 
triggerall = var(59) = 1
triggerall = (P2BodyDist X < 0) || (P2BodyDist X > 0) && (enemy,facing != facing)
trigger1 = stateno = [1030,1032] 
trigger1 = p2bodydist X > 210
var(2) = 1

[State -1, msgn]
type = ChangeState
value = 1040
triggerall = var(59) = 1
triggerall = var(2) = 1
triggerall = statetype != A
trigger1 = (stateno = [1030,1032]) && (Animelemtime(9) = 4)

;---------------------------------------------------------------------------
[State -1, 直]
type = varset 
triggerall = var(59) = 1
triggerall = (P2BodyDist X < 0) || (P2BodyDist X > 0) && (enemy,facing != facing)
trigger1 = stateno = [1030,1032] 
trigger1 = p2bodydist X > 210
trigger1 = p2statetype != A
var(2) = 3

[State -1, msgn]
type = ChangeState
value = 1042
triggerall = var(59) = 1
triggerall = var(2) = 3
triggerall = statetype != A
trigger1 = (stateno = [1030,1032]) && (Animelemtime(9) = 4)

;---------------------------------------------------------------------------
[State -1, gn]
type = changestate
value = ifelse(random%2 = 0,1050,1052)
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = ctrl = 1
trigger1 = (p2statetype = S) && (p2bodydist X = [100,180])
trigger2 = StateNo = 1002

;---------------------------------------------------------------------------
[State -1, gn]
type = ChangeState
value = 1051
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = ctrl
trigger1 = p2statetype = A
trigger1 = p2bodydist X = [100,180]
trigger1 = P2BodyDist Y = [0,-30]

;---------------------------------------------------------------------------
[State -1, gn]
type = ChangeState
value = 1052
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = ctrl
trigger1 = (p2statetype = C) && (p2bodydist X > 60)

;---------------------------------------------------------------------------
[State -1, 300]
type = ChangeState
value = 300
triggerall = command != "holddown"
triggerall = statetype = S ;立ち
triggerall = stateno != 100 ;ダッシュ中かどうか
triggerall = var(59)
triggerall = ctrl
trigger1 = (p2statetype != A) && (p2bodydist X < 100);75
trigger1= random%3 = 0
;---------------------------------------------------------------------------
[State -1, gn]
type = changestate
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = ctrl = 1
trigger1 = (p2statetype = S) && (p2bodydist X = [90,130])
trigger1 = random%3 = 1
value = ifelse(random%2 = 0,1000,1003)

;---------------------------------------------------------------------------
[State -1, 1000]
type = ChangeState
value = 1000
triggerall = var(59) = 1
triggerall = statetype != A
trigger1= ctrl
trigger1 = p2bodydist X = [90,130]
trigger4 = P2BodyDist X < 60
trigger4 = P2BodyDist Y = [-10,-40]

;---------------------------------------------------------------------------
[State -1, 1000]
type = ChangeState
value = 1003
triggerall = var(59) = 1
triggerall = statetype != A
trigger1 = ctrl
trigger1 = (p2bodydist X < 170) && (p2bodydist X > 90)
trigger2 = (stateno = 220) && (movecontact)
trigger3 = (stateno = 250) && (movecontact)

;---------------------------------------------------------------------------
[State -1, 1000]
type = ChangeState
value = 1005
triggerall = var(59) = 1
triggerall = statetype != A
trigger1 = ctrl
trigger1 = (p2bodydist X < 210) && (p2bodydist X > 90)
trigger4 = (stateno = 1060) && (movehit)
trigger4 = random%2 = 0

;---------------------------------------------------------------------------
[State -1, 1062]
type = ChangeState
value = 1062
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = var(3) = 1
triggerall = prevstateno != 810
triggerall = p2bodydist Y > -30
triggerall = p2bodydist X < 50
trigger1 = ctrl
trigger1 = random%3 = 0
trigger2 = (stateno = 210) || (stateno = 240) || (stateno = 440)

;---------------------------------------------------------------------------
[State -1, 1060]
type = ChangeState
value = 1060 + (random%3)
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = prevstateno != 810
triggerall = p2bodydist Y > -30
triggerall = p2bodydist X < 50
trigger1 = ctrl
trigger2 = (stateno = 450) && (movehit)
trigger3 = random%5 = 0
trigger3 = (stateno = 210) || (stateno = 240) || (stateno = 440)

;---------------------------------------------------------------------------
[State -1, 230~]
type = ChangeState
value = 240
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = ctrl
trigger1 = p2bodydist X < 40 
trigger2 = (stateno = 230) && (movehit)
;---------------------------------------------------------------------------
[State -1, 230~]
type = ChangeState
value = 250
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = ctrl
trigger1 = p2bodydist X < 40 
trigger2 = (stateno = 240) && (movehit)

;---------------------------------------------------------------------------
[State -1, Stand Strong Punch2]
type = ChangeState
value = 221
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = (MoveGuarded) && (stateno = 220)
;---------------------------------------------------------------------------
[State -1, 200~]
type = ChangeState
value = 220
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = (stateno = 210) && (movehit)

;---------------------------------------------------------------------------
[State -1, 630~]
type = ChangeState
value = 630
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = ctrl
triggerall = p2bodydist X < 50 
triggerall = P2dist Y > 30
trigger1 = random%2 = 0

;---------------------------------------------------------------------------
[State -1, 630~]
type = ChangeState
value = 640
triggerall = var(59) = 1
triggerall = statetype = A
trigger1 = ctrl
trigger1 = p2bodydist X < 60 
trigger1 = random%2 = 1
trigger2 = (stateno = 630) && (movecontact)

;---------------------------------------------------------------------------
[State -1, 200~]
type = ChangeState
value = 650
triggerall = var(59) = 1
triggerall = statetype = A
trigger1 = ctrl
trigger1 = p2bodydist X < 60
trigger1 = random%2 = 0
trigger2 = (stateno = 640) && (movecontact)

;---------------------------------------------------------------------------
[State -1, s7]
type = ChangeState
value = 1070
triggerall = var(59) = 1
triggerall = statetype = A
trigger1 = ctrl
trigger1 = var(12)%2 = 0
trigger1 = stateno != 2300
trigger1 = P2BodyDist X >= 60
trigger1 = P2BodyDist Y = [-30,30]
trigger2 = (stateno = 650) && (MoveContact)
trigger3 = var(3) = 1
trigger3 = (stateno = [600,699]) && (MoveGuarded)
trigger4 = var(3) = 1
trigger4 = (stateno = [1000,1005]) && (MoveGuarded)

;---------------------------------------------------------------------------
[State -1, 430~]
type = ChangeState
value = 440
triggerall = var(59) = 1
triggerall = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X < 40
trigger1 = p2bodydist Y > -20
trigger1 = prevstateno != 810
trigger2 = (stateno = 430) && (movehit)

;---------------------------------------------------------------------------
[State -1, 430~]
type = ChangeState
value = 450
triggerall = var(59) = 1
triggerAll = enemy,Pos Y = 0
triggerall = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X < 70
trigger1 = prevstateno != 810
trigger2 = (stateno = 440) && (movehit)

;---------------------------------------------------------------------------
[State -1,reco]
type = ChangeState
value = 5200
triggerall = var(59) = 1
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
trigger1 = canrecover = 1
trigger1 = stateno = 5050
trigger1 = random>500&&gameTime%10=0

;---------------------------------------------------------------------------
[State -1,reco]
type = ChangeState
value = 5210
triggerall = var(59) = 1
triggerall = Vel Y > -1
trigger1 = canrecover = 1
trigger1 = stateno = 5050
trigger1 = random>500&&gameTime%3=0
;---------------------------------------------------------------------------
[State ,1];←ヘルパーを呼び出す
type = Helper
triggerall = var(59) = 1
triggerall = NumHelper(2000)=0
triggerall = (stateno = [1081,1082]); || (stateno = 1074)
trigger1 = var(12)%3 = [0,1]
trigger2 = var(3) = 1
id = 2000
name = "trinity"
sprpriority = 4
pos = -300,-150
postype = p2
facing = 1
stateno = 2010;←呼び出されたヘルパーはこのステートから始まる
helpertype = normal
keyctrl = 0          
ownpal = 0
;---------------------------------------------------------------------------
[State -1, matyoke]
type = ChangeState
value = 1080
triggerall = var(59) = 1
triggerall = Var(9) = 0
triggerall = ctrl = 1
triggerall = Statetype = S
trigger1 = Statetype = S
trigger2 = p2Statetype = L
trigger3 = prevstateno = 5120
trigger4 = p2bodydist X > 230
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 130
triggerall = var(59) = 1
triggerall = p2movetype = A;相手が攻撃状態の時
triggerall = ctrl = 1
triggerall = Statetype = S
trigger1 = p2bodydist X >= 500
trigger2 = HitOver = 1
trigger2 = p2bodydist X >= 210
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 131
triggerall = var(59) = 1
triggerall = p2movetype = A;相手が攻撃状態の時
triggerall = ctrl = 1
triggerall = Statetype = C
trigger1 = p2bodydist X >= 500
trigger2 = HitOver = 1
trigger2 = p2bodydist X >= 210
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 132
triggerall = var(59) = 1
triggerall = p2movetype = A;相手が攻撃状態の時
triggerall = ctrl = 1
triggerall = Statetype = A
trigger1 = p2bodydist X >= 500
trigger2 = HitOver = 1
trigger2 = p2bodydist X >= 210

;---------------------------------------------------------------------------
;空中前ダッシュ
[State -1, airrun]
type = ChangeState
value = 2300
triggerall = 0
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = stateno != 2300
trigger1 = ctrl
trigger1 = P2BodyDist Y > 40




;---------------------------------------------------------------------------
;カウンター
;---------------------------------------------------------------------------
[State -1, ]
type = VarSet
var(16) = 900
var(17) = 1
triggerall = (stateno = 150)||(stateno = 151)
trigger1 = (command = "CF_a")||(command = "CF_b")||(command = "CF_c")
trigger2 = var(59) = 1
trigger2 = P2BodyDist X < 50
trigger2 = EnemyNear,MoveType != A
trigger3 = var(58) = 1
trigger3 = (command = "a") || (command = "b") || (command = "c") || (command = "x") || (command = "y") || (command = "z")

[State -1, ]
type = VarSet
var(16) = 640
var(17) = 1
triggerall = stateno = 152
trigger1 = (command = "CF_a")||(command = "CF_b")||(command = "CF_c")
trigger2 = var(59) = 1
trigger2 = P2BodyDist X < 50
trigger2 = EnemyNear,MoveType != A
trigger3 = var(58) = 1
trigger3 = (command = "a") || (command = "b") || (command = "c") || (command = "x") || (command = "y") || (command = "z")




[State -1, ]
type = Varadd
var(17) = 1
trigger1 = var(17) > 0

[State -1, ]
type = VarSet
var(17) = 0
trigger1 = var(17) = 2

;---------------------------------------------------------------------------
;ガードキャンセル
[State -1, Kung Fu Throw]
type = ChangeState
value = var(16)
;triggerall = NumHelper(8357) = 0;アドバンシング
triggerall = (stateno = 150)||(stateno = 151)||(stateno = 152)
trigger1 = var(16) != 0


;===========================================================================
;===========================================================================
;===========================================================================
;超必ｈ４侵入
[State -1, h4]
type = ChangeState
value = 3020
triggerall = var(59) = 0
triggerall = command = "Hack"
triggerall = power >= 3000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299])
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1030,1699]) && (movecontact)

;---------------------------------------------------------------------------
;バレットタイム
[State -1]
type = ChangeState
value = 3005
triggerall = var(59) = 0
triggerall = command = "BT"
triggerall = power >= 1000
triggerall = var(3) = 0
triggerall = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;超必_アップグレード
[State -1]
type = ChangeState
value = 3070
triggerall = var(59) = 0
triggerall = var(58) = 0
triggerall = command = "FD_abc"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;超必_ヘリ＆ガトリング砲
[State -1, h3]
type = ChangeState
value = 3040
triggerall = var(59) = 0
triggerall = command = "DB_abc"
triggerall = power >= 1000
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = 600) || (stateno = 699)
trigger2 = movecontact
trigger3 = (stateno = [1030,1699]) && (movecontact)
;trigger5 = var(59) = 1
;trigger5 = (p2bodydist X < 150) && (ctrl = 1)

;---------------------------------------------------------------------------
;超必_ヘリ＆ガトリング砲
[State -1, h3]
type = ChangeState
value = 3030
triggerall = var(59) = 0
triggerall = command = "DB_abc"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1030,1699]) && (movecontact)
;trigger5 = var(59) = 1
;trigger5 = (p2bodydist X < 150) && (ctrl = 1)

;---------------------------------------------------------------------------
;超必ｈ３乱舞
[State -1, h3]
type = ChangeState
value = 3010
triggerall = var(59) = 0
triggerall = command = "DB_xyz"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1030,1699]) && (movecontact)
;trigger5 = var(59) = 1
;trigger5 = (p2bodydist X < 150) && (ctrl = 1)
;---------------------------------------------------------------------------
;超必ｈ１ダブルガン
[State -1, h1]
type = ChangeState
value = 3000
triggerall = var(59) = 0
triggerall = command = "DF_xyz"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1030,1699]) && (movecontact)

;---------------------------------------------------------------------------
;超必ｈ２ダブルガン
[State -1, h2]
type = ChangeState
value = 3001
triggerall = var(59) = 0
triggerall = command = "DF_*z"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1030,1699]) && (movecontact)

;===========================================================================

;---------------------------------------------------------------------------
;必殺７ガン空中
[State -1, s7]
type = ChangeState
value = 1070
triggerall = command = "CF_x"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = 2300) || (stateno = 2301)
trigger3 = (stateno = 840)
trigger4 = (stateno = [600,699]) || (movecontact)
trigger5 = (stateno = [1000,1002]) && (movecontact)
;---------------------------------------------------------------------------
;必殺７ガン空中
[State -1, s7]
type = ChangeState
value = 1070
triggerall = command = "CF_y"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = 2300) || (stateno = 2301)
trigger3 = (stateno = 840)
trigger4 = (stateno = [600,699]) || (movecontact)
trigger5 = (stateno = [1000,1002]) && (movecontact)
;---------------------------------------------------------------------------
;必殺７ガン空中
[State -1, s7]
type = ChangeState
value = 1070
triggerall = command = "CF_z"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = 2300) || (stateno = 2301)
trigger3 = (stateno = 840)
trigger4 = (stateno = [600,699]) || (movecontact)
trigger5 = (stateno = [1000,1002]) && (movecontact)

;---------------------------------------------------------------------------
;必殺３マシンガン（弱）
[State -1, s3l]
type = ChangeState
value = 1032
triggerall = command = "BCF_x"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1060,1062]) && (movecontact)

;---------------------------------------------------------------------------
;必殺３マシンガン（中）
[State -1, s3m]
type = ChangeState
value = 1031
triggerall = command = "BCF_y"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1060,1062]) && (movecontact)

;---------------------------------------------------------------------------
;必殺３マシンガン（強）
[State -1, s3s]
type = ChangeState
value = 1030
triggerall = command = "BCF_z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1060,1062]) && (movecontact)

;---------------------------------------------------------------------------
;必殺３マシンガン（追加弱）
[State -1, s3l plus]
type = varset 
triggerall = command = "FC_x" 
trigger1 = stateno = [1030,1032] 
var(2) = 1 

[State -1, s3l plus] 
type = ChangeState 
triggerall = var(2) = 1 
triggerall = statetype != A 
trigger1 = (stateno = 1030 && Animelemtime(9) = 4)
trigger2 = (stateno = 1031 && Animelemtime(9) = 4)
trigger3 = (stateno = 1032 && Animelemtime(9) = 4) 
value = 1042 

;---------------------------------------------------------------------------
;必殺３マシンガン（追加中）
[State -1, s3m plus]
type = varset 
triggerall = command = "FC_y" 
trigger1 = stateno = [1030,1032] 
var(2) = 2 

[State -1, s3m plus] 
type = ChangeState 
triggerall = var(2) = 2 
triggerall = statetype != A 
trigger1 = (stateno = 1030 && Animelemtime(9) = 4)
trigger2 = (stateno = 1031 && Animelemtime(9) = 4)
trigger3 = (stateno = 1032 && Animelemtime(9) = 4) 
value = 1041 

;---------------------------------------------------------------------------
;必殺３マシンガン（追加強）
[State -1, s3s plus]
type = varset 
triggerall = command = "FC_z" 
trigger1 = stateno = [1030,1032] 
var(2) = 3 

[State -1, s3s plus] 
type = ChangeState 
triggerall = var(2) = 3 
triggerall = statetype != A 
trigger1 = (stateno = 1030 && Animelemtime(9) = 4)
trigger2 = (stateno = 1031 && Animelemtime(9) = 4)
trigger3 = (stateno = 1032 && Animelemtime(9) = 4) 
value = 1040 

;---------------------------------------------------------------------------
;必殺８マト避けb
[State -1, s8]
type = ChangeState
value = 1080
triggerall = var(9) = 0
triggerall = (command = "BDB_a") || (command = "BDB_b") || (command = "BDB_c")
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger4 = (stateno = [1060,1062])

;---------------------------------------------------------------------------
;必殺４ガン（弱）
[State -1, s4l]
type = ChangeState
value = 1050
triggerall = command = "CF_x"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1060,1062]) && (movecontact)

;---------------------------------------------------------------------------
;必殺４ガン（中）
[State -1, s4m]
type = ChangeState
value = 1051
triggerall = command = "CF_y"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1060,1062]) && (movecontact)

;---------------------------------------------------------------------------
;必殺４ガン（強）
[State -1, s4s]
type = ChangeState
value = 1052
triggerall = command = "CF_z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1060,1062]) && (movecontact)

;---------------------------------------------------------------------------
;必殺６掌底（弱）
[State -1, s6l]
type = ChangeState
value = 1060
triggerall = command = "CB_x"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact

;---------------------------------------------------------------------------
;必殺６掌底（中）
[State -1, s6m]
type = ChangeState
value = 1061
triggerall = command = "CB_y"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact

;---------------------------------------------------------------------------
;必殺６掌底（強）
[State -1, s6s]
type = ChangeState
value = 1062
triggerall = command = "CB_z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact

;---------------------------------------------------------------------------
;必殺１キック（弱）
[State -1, s1l]
type = ChangeState
value = 1000
triggerall = command = "CB_a"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1060,1062]) && (movecontact)

;---------------------------------------------------------------------------
;必殺１キック（中）
[State -1, s1m]
type = ChangeState
value = 1003
triggerall = command = "CB_b"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1060,1062]) && (movecontact)

;---------------------------------------------------------------------------
;必殺１キック（強）
[State -1, s1s]
type = ChangeState
value = 1005
triggerall = command = "CB_c"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100) || (stateno = 105)
trigger3 = (stateno = [200,299]) || (stateno = [400,499])
trigger3 = movecontact
trigger4 = (stateno = [1060,1062]) && (movecontact)

;===========================================================================
;レバー前入れ強攻撃（ソバット）
[State -1]
type = ChangeState
value = 300
triggerall = command != "holddown"
trigger1 = statetype = S ;立ち
trigger1 = stateno != 100 ;ダッシュ中かどうか
trigger1 = command = "fwd_c"
trigger1 = ctrl
;---------------------------------------------------------------------------
;ダッシュ攻撃（ソバット）
[State -1]
type = ChangeState
value = 305
triggerall = command != "holddown"
trigger1 = stateno = 100 ;ダッシュ中
trigger1 = command = "fwd_a"
trigger1 = ctrl
trigger2 = stateno = 100
trigger2 = command = "fwd_b"
trigger2 = ctrl
trigger3 = stateno = 100
trigger3 = command = "fwd_c"
trigger3 = ctrl

;---------------------------------------------------------------------------
;ハイジャンプ
[State -1, Run Fwd]
type = ChangeState
value = 840
trigger1 = command = "h_jump"
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;ダッシュ
[State -1, Run Fwd]
type = ChangeState
value = 100
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;後退ダッシュ
[State -1, Run Back]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;空中前ダッシュ
;普通のステート、この中では一番簡単なステート
;ただし空中ダッシュを連続でできないように「stateno ! = 2300」としています
;詳細はairdash.cnsで

[State -1, airrun]
type = ChangeState
value = 2300
triggerall = var(59) = 0
triggerall = statetype = A
trigger1 = command = "FF"
trigger1 = ctrl
trigger1 = stateno != 2300

;---------------------------------------------------------------------------
;空中後ろダッシュ
;普通のステート、この中では一番簡単なステート
;ただし空中ダッシュを連続でできないように「stateno ! = 2301」としています
;詳細はairdash.cnsで

[State -1, airrun]
type = ChangeState
value = 2301
trigger1 = command = "BB"
triggerall = statetype = A
trigger1 = ctrl
trigger1 = stateno != 2301

;---------------------------------------------------------------------------
;アドバンシングガード
[State -1]
type = ChangeState
value = 830
;triggerall = var(59) = 0
triggerall = roundstate = 2
triggerall = command = "x+y+z"
triggerall = prevstateno != [830,831]
trigger1 = stateno = 150 || stateno = 151 || stateno = 152 || stateno = 153
ignorehitpause = 1

;---------------------------------------------------------------------------
;パワー溜め
;新しく「holdx」「holdy」というコマンドを作ります
;あわせるとXとYを同時に押すとってことです。
;パワーがＭＡＸなのに溜めるのは変なのでトリガーにpower != 3000を付けます。
;詳細はpower.cnsで

;[State -1, Run Back]
;type = ChangeState
;value = 2000
;triggerall = power != 3000
;trigger1 = command = "holdx"
;trigger1 = command = "holdy"
;trigger1 = statetype = S
;trigger1 = ctrl

;---------------------------------------------------------------------------
;ストライカー
[State 2000,1];←ヘルパーを呼び出す
type = Helper
triggerall=NumHelper(2000)=0
triggerall = (stateno = [1081,1082]); || (stateno = 1074)
trigger1 = 1;command = "tri"
;trigger1 = power > 1000
;trigger1 = var(11) = 1
id = 2000
name = "trinity"
sprpriority = 4
pos = -300,-150;-300,-150
postype = p2
facing = 1
stateno = 2010;←呼び出されたヘルパーはこのステートから始まる
helpertype = normal
keyctrl = 0          
ownpal = 0


;---------------------------------------------------------------------------

;後避け
;とても簡単なステートです。
;ここでやってる特殊なことは「効率化」です。
;詳細はaway.cnsで

[State -1, Away]
type = ChangeState
value = 115
triggerall = command = "away-b"
triggerall = statetype = S
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = movecontact

;---------------------------------------------------------------------------

;前避け
;とても簡単なステートです。
;ここでやってる特殊なことは「効率化」です。
;詳細はaway.cnsで

[State -1, Away]
type = ChangeState
value = 110
triggerall = command = "away-f"
triggerall = statetype = S
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = movecontact

;---------------------------------------------------------------------------


;---------------------------------------------------------------------------

;起き上がり
;[State -1, getup]
;type = ChangeState
;value = 5125
;triggerall = command = "getup"
;triggerall = command != "holddown"
;trigger1 = stateno = 5110
;trigger1 = statetype = L
;trigger1 = time > 5

;---------------------------------------------------------------------------

;投げ
[State -1, Kung Fu Throw]
type = ChangeState
value = 800
triggerall = command = "z"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 8
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
trigger2 = command = "holdback"
trigger2 = p2bodydist X < 10
trigger2 = (p2statetype = S) || (p2statetype = C)
trigger2 = p2movetype != H


;===========================================================================
;---------------------------------------------------------------------------
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 100)
trigger3 = (stateno = 105)
trigger4 = (movecontact) && (stateno = 430)
trigger5 = (movecontact) && (stateno = 230) 
trigger5 = prevstateno != 200

;---------------------------------------------------------------------------
;立ち中パンチ
[State -1, Stand midium Punch]
type = ChangeState
value = 210
triggerall = command = "y"
triggerall = command != "holddown"
triggerall = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 100)
trigger3 = (stateno = 105)
trigger4 = (stateno = [200,209]) || (stateno = 230)
trigger4 = movecontact
trigger5 = (movecontact) && (stateno = 430)

;---------------------------------------------------------------------------
;立ち強パンチ
[State -1, Stand Strong Punch]
type = ChangeState
value = 220
triggerall = command = "z"
triggerall = command != "holddown"
triggerall = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 100)
trigger3 = (stateno = 105)
trigger4 = (stateno = [200,210]) || (stateno = [230,240])
trigger4 = movecontact
trigger5 = (movecontact) && (stateno = 430)

;---------------------------------------------------------------------------
;立ち小キック
[State -1, Stand light Kick]
type = ChangeState
value = 230
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 100)
trigger3 = (stateno = 105)
trigger4 = (movecontact) && (stateno = 430)
trigger5 = (movecontact) && (stateno = 200) 
trigger5 = prevstateno != 230

;---------------------------------------------------------------------------
;立ち中キック
[State -1, Stand midium Kick]
type = ChangeState
value = 240
triggerall = command = "b"
triggerall = command != "holddown"
triggerall = statetype = S 
trigger1 = ctrl
trigger2 = (stateno = 100)
trigger3 = (stateno = 105)
trigger4 = (stateno = [200,209]) || (stateno = 230)
trigger4 = movecontact
trigger5 = (movecontact) && (stateno = 430)

;---------------------------------------------------------------------------
;立ち強キック
[State -1, Standing Strong Kick]
type = ChangeState
value = 250
triggerall = command = "c"
triggerall = command != "holddown"
triggerall = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 100)
trigger3 = (stateno = 105)
trigger4 = (stateno = [200,210]) || (stateno = [230,240])
trigger4 = movecontact
trigger5 = (movecontact) && (stateno = 430)

;---------------------------------------------------------------------------
;挑発
;[State -1, Taunt]
;type = ChangeState
;value = 195
;trigger1 = statetype != A
;trigger1 = command = "start"
;trigger1 = ctrl

;---------------------------------------------------------------------------
;しゃがみ弱パンチ
[State -1, Crouching Light Kick]
type = ChangeState
value = 400
triggerall = command = "x"
triggerall = command = "holddown"
triggerall = statetype = C
trigger1 = ctrl
trigger2 = (stateno = [200,209]) || (stateno = [230,239])
trigger2 = movecontact

;---------------------------------------------------------------------------
;しゃがみ中パンチ
[State -1, Crouching Light Kick]
type = ChangeState
value = 410
triggerall = command = "y"
triggerall = command = "holddown"
triggerall = statetype = C
trigger1 = ctrl
trigger2 = (stateno = [200,209]) || (stateno = [230,239])
trigger2 = movecontact
trigger3 = (stateno = 400) && movehit
trigger4 = (stateno = 430) && movehit

;---------------------------------------------------------------------------
;しゃがみ弱キック
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = command = "a"
triggerall = command = "holddown"
triggerall = statetype = C
trigger1 = ctrl
trigger2 = (stateno = [200,209]) || (stateno = [230,239])
trigger2 = movecontact
trigger3 = (stateno = 430) && movehit
trigger4 = (stateno = 400) && movehit

;---------------------------------------------------------------------------
;しゃがみ中キック
[State -1, Crouching M Kick]
type = ChangeState
value = 440
triggerall = command = "b"
triggerall = command = "holddown"
triggerall = statetype = C
trigger1 = ctrl
trigger2 = (stateno = [200,209]) || (stateno = [230,239])
trigger2 = movecontact
trigger3 = (stateno = 430) && (movecontact)
trigger4 = (stateno = 400) && (movecontact)

;---------------------------------------------------------------------------
;しゃがみ強キック
[State -1, Crouching M Kick]
type = ChangeState
value = 450
triggerall = command = "c"
triggerall = command = "holddown"
triggerall = statetype = C
trigger1 = ctrl
trigger2 = (stateno = [200,209]) || (stateno = [230,239])
trigger2 = movecontact
trigger3 = (stateno = [210,219]) || (stateno = [240,249])
trigger3 = movecontact
trigger4 = (stateno = [430,440]) && (movecontact)
trigger5 = (stateno = [400,410]) && (movecontact)

;---------------------------------------------------------------------------
;空中弱パンチ
[State -1, Jump Light Kick]
type = ChangeState
value = 600
triggerall = command = "x"
triggerall = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
;空中中パンチ
[State -1, Jump M Kick]
type = ChangeState
value = 610
triggerall = command = "y"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (movecontact) && (stateno = 600)
trigger3 = (movecontact) && (stateno = 630)

;---------------------------------------------------------------------------
;空中弱キック
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = command = "a"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (movecontact) && (stateno = 600)

;---------------------------------------------------------------------------
;空中中キック
[State -1, Jump M Kick]
type = ChangeState
value = 640
triggerall = command = "b"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (movecontact) && (stateno = 630)
trigger3 = (movecontact) && (stateno = 600)

;---------------------------------------------------------------------------
;空中強キック
[State -1, Jump S Kick]
type = ChangeState
value = 650
triggerall = command = "c"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (movecontact) && (stateno = 630)
trigger3 = (movecontact) && (stateno = 640)
trigger4 = (movecontact) && (stateno = 600)
trigger5 = (movecontact) && (stateno = 610)

;---------------------------------------------------------------------------
;立ち強パンチ追加攻撃１
[State -1, Stand Strong Punch2]
type = ChangeState
value = 221
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype = S 
trigger1 = (movecontact) && (stateno = 220)

;---------------------------------------------------------------------------
;立ち弱パンチ追加攻撃１
[State -1, Stand Light Punch1]
type = ChangeState
value = 201
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype = S 
trigger1 = ctrl
trigger2 = (movecontact) && (stateno = 200)

;---------------------------------------------------------------------------
;立ち弱パンチ追加攻撃２
[State -1, Stand Light Punch2]
type = ChangeState
value = 202
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype = S 
trigger1 = ctrl
trigger2 = (movecontact) && (stateno = 201)

;---------------------------------------------------------------------------


